package com.example.goodsserver.controller;

import com.example.goodsserver.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @RequestMapping("/deductGoodsStock")
    public Boolean deductGoodsStock(Long goodsId, Integer quantity) {
        return goodsService.deductGoodsStock(goodsId, quantity);
    }
}